/**
 * @use 登录模块
 */
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
    encrypttype?: number;
  }
  export interface ResLogin {
    secret: string;
    token: string;
  }
}

/**
 * @use 菜单模块
 */
export namespace Menu {
  export interface MenuOptions {
    path: string;
    name: string;
    component?: string | (() => Promise<unknown>);
    redirect?: string;
    meta: MetaProps;
    children?: MenuOptions[];
  }
  interface MetaProps {
    icon: string;
    title: string;
    activeMenu?: string;
    isLink?: string;
    isHide: boolean;
    isFull: boolean;
    isAffix: boolean;
    isKeepAlive: boolean;
  }
}

/**
 * @use 标签Tabs模块
 */
export interface TabsMenuProps {
  icon: string;
  title: string;
  path: string;
  name: string;
  close: boolean;
  isKeepAlive: boolean;
}

/**
 * @use 设备模块
 */

export namespace Equip {
  export interface EquipOptionsRes {
    bycurstate: number;
    bycurvol: number;
    bydevtype: number;
    cpdevname: string;
    musicfullinfo: string;
    undevid: number;
  }
  export interface EquipChangeVolReq {
    secret: string;
    deviceidarray: number[];
    vol: number;
  }
}

/**
 * @use 音乐模块
 */
export namespace Music {
  export interface MusicOptionsRes {
    name: string;
    isChecked: boolean;
    list: MusicListProps[];
  }
  interface MusicListProps {
    duration: number;
    fullpathname: string;
    type: number;
  }
}
